Refactoring and improvements to bot contributing docs#1627
Conversation
✅ Deploy Preview for pydis-static ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Gitpod is now Ona: your AI software engineer
cfbedbd to
c0e69e6
Compare
| The following are needed to run the bot. Follow the links for installation instructions. | ||
|
|
||
| - [uv](https://docs.astral.sh/uv/getting-started/installation/). | ||
| - [Python 3.14](https://www.python.org/downloads/). This can be installed [using uv](https://docs.astral.sh/uv/guides/install-python/#installing-python). |
There was a problem hiding this comment.
When you run uv sync the first time it will automagically set up the venv with the appropriate Python version.
|
|
||
| To start, ensure you have forked and cloned the [bot repository](https://github.com/python-discord/bot) to your local machine. For help with this, check out our [forking and cloning guide](../forking-and-cloning). | ||
|
|
||
| From the root of the cloned repository, run the following command to install the project dependencies: |
There was a problem hiding this comment.
| From the root of the cloned repository, run the following command to install the project dependencies: | |
| From the root of the cloned repository, run the following command to set up the virtual environment and install the project dependencies: |
|
|
||
| You can start your own server and set up channels as you see fit, but for your convenience we have a template for a development server you can use: [https://discord.new/zmHtscpYN9E3](https://discord.new/zmHtscpYN9E3). | ||
| It is highly recommended to use our [server template](https://discord.new/zmHtscpYN9E3), | ||
| as it allows most configuration to be automatically generated for you. |
There was a problem hiding this comment.
| as it allows most configuration to be automatically generated for you. | |
| as it allows most of the configuration to be automatically generated for you. |
| You now have both the bot's code and a server to run it on. It's time for you to connect the two by setting the bot's configuration. | ||
|
|
||
| Both `.env` and `.env.server` files we talk about below are ignored by git, so they do not get accidentally commit to the repository. | ||
| The bot reads variables for configuration from two files, `.env`, and `.env.server`. These files are ignored by git, as they contain information specific to your local environment. |
There was a problem hiding this comment.
| The bot reads variables for configuration from two files, `.env`, and `.env.server`. These files are ignored by git, as they contain information specific to your local environment. | |
| The bot reads variables for configuration from two files, `.env`, and `.env.server`. These files are ignored by git, as they contain information specific to your local environment including secrets such as the bot token. |
I think it's worthwhile to explicitly point this out here because there might be people who don't understand about the proper handling of secrets.
| 1. In the `Installation` tab, set `Install Link` to `None` and click `Save Changes`. | ||
| 1. In the `Bot` tab: | ||
|
|
||
| - Turn off the `Public Bot` setting. |
There was a problem hiding this comment.
IIRC there were issues with creating the link and inviting when Public Bot was off. I would suggest moving that to after the bot has joined the test server. I will also point out that before Public Bot can be turned off the Guild Install checkbox in the Installation tab must be turned off (which is why there are issues with creating the link and adding the bot to the server.)
| After you have created a fork, you will then need to clone the repository to your computer, which is the process | ||
| of downloading the repository from GitHub to your local machine. You will need Git installed on your computer to do this. | ||
|
|
||
| The following will use the [Sir-Lancebot](https://github.com/python-discord/sir-lancebot/) repository as an example, but the steps are the same for all other repositories. |
There was a problem hiding this comment.
| The following will use the [Sir-Lancebot](https://github.com/python-discord/sir-lancebot/) repository as an example, but the steps are the same for all other repositories. | |
| The following will use the [Sir-Lancebot](https://github.com/python-discord/sir-lancebot/) repository | |
| as an example, but the steps are the same for all other repositories. |
Readability in the .MD file and consistency with the rest of the changes.
| 2. Fork it to your account.<br> | ||
|  | ||
| 3. Later, you will need the Git URL of your forked repository in order to clone it. | ||
| In your newly forked repository, copy the Git URL by clicking the green `Code` button, then click the Copy Link button. |
There was a problem hiding this comment.
Should we suggest people go to the SSH tab here because the default is still HTML.
|
|
||
| # Cloning a Repository | ||
|
|
||
| You can clone a repository using the command line directly, or by using your IDEs built-in Git integration. We will cover how to do this with the command line, and with PyCharm's integration. |
There was a problem hiding this comment.
| You can clone a repository using the command line directly, or by using your IDEs built-in Git integration. We will cover how to do this with the command line, and with PyCharm's integration. | |
| You can clone a repository using the command line directly, or by using your IDEs built-in Git integration. | |
| We will cover how to do this with the command line, and with PyCharm's integration. |
| --- | ||
| # Development Environment | ||
| If you aren't using Docker, you will need to [install the project's dependencies](../installing-project-dependencies) yourself. | ||
| From the root of the cloned repository, run the following command to install the project dependencies: |
There was a problem hiding this comment.
| From the root of the cloned repository, run the following command to install the project dependencies: | |
| From the root of the cloned repository, run the following command to set up the virtual environment and install the project dependencies: |
| # Development environment | ||
|
|
||
| [Install the project's dependencies](../installing-project-dependencies/) | ||
| From the root of the cloned repository, run the following command to install the project dependencies: |
There was a problem hiding this comment.
| From the root of the cloned repository, run the following command to install the project dependencies: | |
| From the root of the cloned repository, run the following command to set up the virtual environment and install the project dependencies: |
Rewrite of a bunch of the bot contributing documentation, with some other changes here and there.
Open to any suggestions (including reverting parts/adding bits if it feels too concise now).
Changes:
bot.mdas well so they are harder to missdocker-compose->docker composeinstalling-project-dependencies.mduv syncdoesn't deserve a whole page.obtaining-discord-ids.mdsetting-test-server-and-bot-account.mdas it is a duplicate ofcreating-bot-account.mdandobtaining-discord-ids.mdbot.mdto be more concise and hopefully clearer.